#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = (a);i <= (b);i++)
#define ep emplace_back
#define pb push_back
#define PII pair<int,int>
#define fi first
#define se second
char buf[1 << 20],*p1,*p2;
#define gc() ((p1 == p2 && (p2 = (p1 = buf) + fread(buf,1,1 << 20,stdin),p1 == p2)) ? 0 : *p1++)
int read(){
    int x = 0,f = 1,ch = gc();
    while(!isdigit(ch)){
        if(ch == '-') f = -1;
        ch = gc();
    }
    while(isdigit(ch)){
        x = x * 10 + (ch ^ 48);
        ch = gc();
    }
    return x * f;
}
const int N = 100005;
int n,a[N];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n = read();
    rep(i,1,n){
        int t = read();
        a[t]++;
    }
    int sum = 0,ans = 0;
    rep(i,1,N - 1){
        if(a[i] != 0){
            ans += min(sum,a[i]);
            sum -= min(sum,a[i]);
            sum += a[i];
        }
    }
    cout << n - ans << endl;
    return 0;
}
